<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            border: 1px solid #ccc;
            margin:  100px auto;
            /* 1.转化成弹性盒子 */
            display: flex;
            /* 2.首先横向居中 */
            justify-content: center;
            /* 3.纵向居中 */
            align-items: center;
        }
        .box span {
            display: block;
            width: 40px;
            height: 40px;
            background-color: red;
            border-radius: 50%;
        }
        .box1{
            width: 100px;
            height: 100px;
            border: 1px solid #ccc;
            margin:  100px auto;
            /* 1.转化成弹性盒子 */
            display: flex;
        }
        .box1 span {
            display: block;
            width: 40px;
            height: 40px;
            background-color: red;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <!-- 一点 -->
    <div class="box">
        <span></span>
    </div>
    <!-- 二点 -->
    <div class="box1">
        <span></span>
        <span></span>
    </div>
    
</body>
</html>